const express = require('express');
const app = express();
const bodyParser = require('body-parser');
const router = require('./routes/router.js');

app.use(bodyParser.json());
app.use(bodyParser.urlencoded({extended: true}));
app.use(express.static('views'));
app.use(express.static('public'));
app.use("/", router);

app.listen(3000);
console.log('服务器已启动,访问路径http:\\localhost:3000');